package converters;
 
import java.util.Locale;

import org.apache.commons.beanutils.locale.converters.DoubleLocaleConverter;

public class DoubleLocalConverterCustom extends DoubleLocaleConverter {
	public DoubleLocalConverterCustom(Locale locale){
		super(locale);
	}
	public Object convert(Class type, Object value) {
		if(value == null || value.toString().length() < 1)
			return new Double(0);

		return new Double(value.toString().replace(',','.'));
	}
}
